package com.orange.core.pojo.entity.venue;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.orange.core.pojo.entity.IIntIdModel;
import com.orange.core.pojo.entity.IOperatorModel;
import com.orange.core.util.Constants;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;

/**
 * <p>ClassName:Venue</p>
 * <p>Description: 场地管理表</p>
 * <p>Author: lwm</p>
 * <p>Date: 2025/5/21 23:18</p>
 */
@Data
@Accessors(chain = true)
@TableName(value = "venue", autoResultMap = true)
public class Venue implements IIntIdModel<Venue>, IOperatorModel<Venue> {


    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 场地名称
     */
    private String name;

    /**
     * 场地分类
     */
//    private Integer venueCategory;

    /**
     * 地址
     */
    private String address;

    /**
     * 开始营业时间
     */
    @JsonFormat(pattern = DatePattern.NORM_TIME_PATTERN)
    private LocalTime startTime;

    /**
     * 结束营业时间
     */
    @JsonFormat(pattern = DatePattern.NORM_TIME_PATTERN)
    private LocalTime endTime;


    /**
     * 电话
     */
    private String phoneNumber;

    /**
     * 场地描述
     */
    private String description;

    /**
     * 封面图片
     */
    private String coverImage;

    /**
     * 状态(0-下架,1-上架)
     */
    private Integer status;

    /**
     * 轮播图片，多文件上传
     */
    @TableField(value = "image_url", typeHandler = JacksonTypeHandler.class)
    private List<String> imageUrl;


    @JsonFormat(pattern = Constants.DEFAULT_DATE_FORMAT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT)
    private Integer createBy;

    private LocalDateTime updateTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer updateBy;

}
